package com.feng;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: lrf
 * @create: 2019-09-04
 **/
@Component
public class DemoPublisher {

    @Autowired
    private ApplicationContext applicationContext;


    public void publish(String msg) {
        applicationContext.publishEvent(new DemoEvent(this, msg));
    }
}
